import request from '@/utils/request'

// 新建房产
export function createHouse(data) {
  return request({
    url: '/door/house',
    method: 'post',
    data: data
  })
}

// 获取房产列表
export function getHouseList(params) {
  return request({
    url: '/door/house/list',
    method: 'get',
    params: params
  })
}

// 获取房产详情
export function getHouseDetail(id) {
  return request({
    url: `/door/house/${id}`,
    method: 'get'
  })
}

// 更新房产信息
export function updateHouse(id, data) {
  return request({
    url: `/door/house/${id}`,
    method: 'put',
    data: data
  })
}

// 删除房产
export function deleteHouse(id) {
  return request({
    url: `/door/house/${id}`,
    method: 'delete'
  })
}

// 获取地区树形数据
export function getDeptTree() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}

// 获取房东列表
export function getLandlordList(params) {
  return request({
    url: '/system/role/authUser/allocatedListNoDataScope',
    method: 'get',
    params: params
  })
}

// 资料查询接口
export function getAdslList(params) {
  return request({
    url: '/door/adsl/list',
    method: 'get',
    params: params
  })
}

// 新增房东
export function addLandlord(data) {
  return request({
    url: '/system/user',
    method: 'post',
    data: data
  })
} 